package thinking_java_one_test;

public class FinalTest {

	public static void main(String[] args) {
		Months j = Months.JAN;
		System.out.println(j);
		System.out.println(j==Months.months[0]);
		System.out.println(j.equals(Months.months[0]));
	}

}

class Months {
	private String name;

	public Months(String name) {
		this.name = name;
	}

	@Override
	public String toString() {
		return name;
	}

	public static final Months JAN = new Months("January"), FEB = new Months("February");
	
	public static final Months[] months={JAN,FEB};

}